-
-
Notifications
You must be signed in to change notification settings - Fork 484
fix(jwt): Relax typing to allow Sequence for Token.aud
#4241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(jwt): Relax typing to allow Sequence for Token.aud
#4241
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4241 +/- ##
=======================================
Coverage 97.93% 97.93%
=======================================
Files 319 319
Lines 15583 15584 +1
Branches 1726 1726
=======================================
+ Hits 15261 15262 +1
Misses 184 184
Partials 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi! Is there any chance that this would be merged soon? Our team is currently experiencing an issue with the |
|
Hello @casabre , thanks for the PR! Could you please add a test case so we can go ahead and merge it? |
…arameter from test_token
|
@Harshal6927 @provinzkraut I added an own test for audience validation. Hope that works for you. |
…sequence for audience" This reverts commit 256ac46.
|
@provinzkraut I didn't change the imports but now pytest is complaining about a missing |
|
@provinzkraut In the end, a missing import makes the pytests fail |
Well it's because you are using |
Yes, you right 😅. But I was relying on the correctness of previous logic --> because litestar/litestar/security/jwt/token.py Line 116 in 65b0bd2
It's not a problem for me to pull the collections import out of the type checking guard, but I am really wondering how it was working before 🤔 |
The function signature is not validated during runtime. The dataclass itself is. |
@provinzkraut Yes, I understand that but why was it failing now but before not, when Sequence was accessed too. Anyway... let't move ahead --> if you are satisfied with the change, can you just approve it 😊. |
|
@provinzkraut what do you say to the changes? Can we move forward and merge? |
Sequence for Token.aud
|
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4241 |
Description
Adding Sequence support for audience in JWT Token.
Closes
#4240